package com.ay.wiki_plt.controller;

import com.ay.wiki_plt.common.Result;
import com.ay.wiki_plt.domain.vo.StatisticResp;
import com.ay.wiki_plt.service.EbookSnapshotService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/ebook-snapshot")
public class EbookSnapshotController {

    @Resource
    private EbookSnapshotService ebookSnapshotService;

    /*获取数值*/
    @GetMapping("/get-statistic")
    public Result getStatistic(){
        log.info("获取电子书快照数值");
       List<StatisticResp> statisticRespList =  ebookSnapshotService.getStatistic();
       return Result.success(statisticRespList);
    }

}
